#pragma once

#include <QCompleter>
#include <QJsonObject>
#include <QMainWindow>

#include <kemuTree/Dialog.h>

namespace Ui {
class AccountingVoucher;
}

class AccountingVoucher : public QMainWindow
{
    Q_OBJECT

public:
 friend void loadJsonDoc(AccountingVoucher *av);
 friend void saveJsonDoc(AccountingVoucher *av);
 friend void initJson( AccountingVoucher *av );


    explicit AccountingVoucher(QWidget *parent = nullptr);
    ~AccountingVoucher();

    void createMenu();

    void onFileOpen();
    void onFileSave();

    void onComboBoxTextChanged(const QString &txt);

    void connectToDialog();

    void appendExcel();

private:
    Ui::AccountingVoucher *ui;
    Dialog *w;
    QJsonObject json;
};


